import { createApp } from 'vue'
import App from './App.vue'
import router from './routes'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import '@/common.css'
import '@/style.css'
import  { createPinia }from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {permission} from './directives/index'

const app = createApp(App)
const pinia = createPinia()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router)
    .use(ElementPlus)
    .use(pinia)
app.directive('permission',permission)
    app.mount('#app')